﻿using Dapper;
using Microsoft.KernelMemory;


public class KM批量生成历史数据embeddings保存VectorStore
{
    public async Task 执行()
    {
        var memory = new MemoryWebClient("http://127.0.0.1:9001/");

        using var cn = Db.GetConnection();
        var list = cn.Query("select * from AbnormalReport where solution is not null");
        foreach (var e in list)
        {
            var content = $@"产品:{e.product_no},异常描述:{e.description},解决方案:{e.solution},异常类型:{e.type}";
            Console.WriteLine(content);
            var id = Guid.NewGuid().ToString();
            await memory.ImportTextAsync(content,documentId: id);
            while (!await memory.IsDocumentReadyAsync(documentId: id))
            {
                Console.WriteLine("loading...");
                await Task.Delay(TimeSpan.FromMilliseconds(500));
            }
        }
    }
}

/*
产品:AXA-200,异常描述:A1线因气压不足导致自动停机,解决方案:更换气泵并恢复供气,异常类型:设备故障
loading...
loading...
产品:AXA-200,异常描述:B3线操作员误投型号为XYZ-2的物料,解决方案:隔离批次并重新投料,异常类型:人为失误
loading...
产品:AXA-200,异常描述:注塑机M7出现温度超限报警,解决方案:清理冷却系统并复位,异常类型:设备故障
loading...
产品:AXA-200,异常描述:成品测试F3批次电流超标,解决方案:返修处理并重新测试,异常类型:品质问题
loading...
产品:AXA-200,异常描述:发货前发现G7批次外箱压损,解决方案:更换外箱并加固打包,异常类型:运输问题
loading...
产品:AXA-200,异常描述:终检发现X1产品缺少固定螺丝,解决方案:补装螺丝并加强检查,异常类型:人为失误
loading...
产品:AXA-200,异常描述:传送带T3电机温度过高报警,解决方案:清洗风扇并降温,异常类型:设备故障
loading...
产品:AXA-200,异常描述:贴片机持续报警提示元件空料,解决方案:补充物料并恢复生产,异常类型:物料短缺
loading...
产品:AXA-200,异常描述:喷漆线产品表面涂层脱落,解决方案:调整烘烤时间并重喷,异常类型:工艺问题
loading...
产品:AXA-200,异常描述:产品序列号与订单不符,解决方案:重新打印并核对信息,异常类型:人为失误
loading...
产品:P123456,异常描述:CNC机床在运行过程中突然停止，导致加工中断,解决方案:重启设备并检查电源模块,异常类型:系统故障
loading...
产品:P789012,异常描述:操作员误将型号为X-200的零件装入X-100产品中,解决方案:已隔离错误批次并重新培训员工,异常类型:人为操作
loading...
产品:P345678,异常描述:MES系统与PLC之间通信中断，无法获取实时数据,解决方案:正在排查交换机连接问题,异常类型:网络中断
loading...
产品:P901234,异常描述:注塑模具在使用过程中出现裂纹，影响产品质量,解决方案:更换新模具并安排定期检查,异常类型:设备老化
loading...
产品:P567890,异常描述:温度传感器读数异常，可能导致过热报警,解决方案:待更换传感器并校准,异常类型:硬件故障
loading...
产品:P112233,异常描述:控制系统软件版本不匹配，导致功能异常,解决方案:等待升级最新固件,异常类型:系统故障
loading...
产品:P223344,异常描述:供气系统压力下降，导致多台设备自动停机,解决方案:检查空压机并恢复供气,异常类型:外部因素
loading...
产品:P334455,异常描述:传送带电机负载过高，触发保护机制,解决方案:清理传动部件并重置过载保护器,异常类型:硬件故障
loading...
产品:P445566,异常描述:HMI触摸屏卡死，无法进行参数设置,解决方案:重启HMI系统或更新驱动,异常类型:软件故障
loading...
产品:P556677,异常描述:冷却系统流量偏低，可能引发设备过热,解决方案:检查水泵及管路是否堵塞,异常类型:系统故障
loading...
产品:AXA-200,异常描述:A1线因气压不足导致自动停机,解决方案:更换气泵并恢复供气,异常类型:设备故障
loading...
产品:DXD-450,异常描述:焊接机器人动作异常，无法启动,解决方案:更换控制模块,异常类型:设备故障
loading...
产品:FXF-900,异常描述:F1包装线出现卡箱现象,解决方案:清理异物并调整导轨,异常类型:设备故障
loading...
产品:IXC-330,异常描述:I2区温湿度传感器无响应,解决方案:更换传感器,异常类型:设备故障
loading...
产品:JXD-440,异常描述:J1线工人误操作导致停线,解决方案:培训操作规范,异常类型:人为操作
loading...
产品:NXB-880,异常描述:N1区气压低于警戒值,解决方案:调整气压阀,异常类型:设备故障
loading...
产品:QXB-202,异常描述:Q3包装线缺少包装袋,解决方案:补充物料,异常类型:物料短缺
loading...
产品:SXD-404,异常描述:S1扫码枪无法识别条码,解决方案:更换扫码枪,异常类型:设备故障
loading...
产品:UXF-606,异常描述:U1气泵损坏导致停机,解决方案:更换气泵,异常类型:设备故障
loading...
产品:XXC-929,异常描述:X3工位指示灯不亮,解决方案:更换指示灯,异常类型:设备故障
loading...
产品:CXC-525,异常描述:C1气缸动作不畅,解决方案:清理并加注润滑油,异常类型:设备故障
loading...
产品:DXD-636,异常描述:D2工人误操作导致报警,解决方案:加强培训,异常类型:人为操作
loading...
产品:GXA-969,异常描述:G3扫码枪频繁丢码,解决方案:更换扫码枪,异常类型:设备故障
loading...
产品:JXD-323,异常描述:J2气源压力低于标准,解决方案:调整气源,异常类型:设备故障
loading...
产品:KXE-434,异常描述:K1包装机卡纸,解决方案:清理卡纸,异常类型:设备故障
loading...
产品:NXB-767,异常描述:N3气泵噪音异常,解决方案:更换轴承,异常类型:设备故障
loading...
产品:RXC-444,异常描述:R3原料批次混乱，影响追溯,解决方案:重新整理批次标签,异常类型:物料异常
loading...
产品:TXE-666,异常描述:T1包装箱运输途中破损,解决方案:更换包装箱,异常类型:运输问题
loading...
产品:VXA-888,异常描述:V3扫码枪频繁掉线,解决方案:更换扫码枪,异常类型:设备故障
loading...
产品:YXD-222,异常描述:Y3气动阀卡死无法动作,解决方案:更换气动阀,异常类型:设备故障
loading...
产品:BXB-555,异常描述:B2气缸漏气影响动作,解决方案:更换密封圈,异常类型:设备故障
loading...
产品:CXC-666,异常描述:C3工人未按流程操作,解决方案:加强培训,异常类型:人为操作
loading...
产品:FXF-999,异常描述:F1扫码枪无法识别二维码,解决方案:更换扫码枪,异常类型:设备故障
loading...
产品:IXC-333,异常描述:I3气源管道泄漏,解决方案:更换管道,异常类型:设备故障
loading... 

产品:AXA-200,异常描述:A1线因气压不足导致自动停机,解决方案:更换气泵并恢复供气,异常类型:设备故障
loading...
-------------------
AXA-200 异常描述
<think>
Okay, let me tackle this query. The user is asking about the abnormal description of AXA-200. From the provided facts, there's a file called content.txt with a relevance of 95.0%. The content mentions that the product AXA-200 has an abnormal description where A1 line stops automatically due to insufficient air pressure. The solution was to replace the air pump and restore gas supply, and the type of abnormality is a device fault.

So, the question is specifically about the abnormal description. The answer should focus on the problem stated: A1 line stopping because of low air pressure. I need to make sure I don't include the solution or the type unless necessary. The user might be looking for the exact reason for the anomaly. Let me check if there's any other info, but the facts only mention that. No other details are present. So the answer should state that the A1 line automatically stopped due to insufficient air pressure, which is a device fault. Wait, the question is just about the description, not the type. The description is the problem itself. So maybe just the part about the A1 line stopping due to low air pressure. The solution and type are additional info but not part of the description. Let me confirm. The user's question is "AXA-200 异常描述?" which translates to "AXA-200 abnormal description?" So the answer should be the part that explains what the abnormality is. The solution and type are separate. So the answer is that the A1 line stopped automatically due to insufficient air pressure. That's the main point. I should present that clearly.
</think>

AXA-200的异常描述为：A1线因气压不足导致自动停机。该问题属于设备故障，需通过更换气泵并恢复供气来解决。
-------------------



 
 */